//
//  userAuthModel.h
//  toolBox
//
//  Created by Alex on 08/07/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "USER.h"

@interface userAuthModel : NSObject
{
    NSString *isAuthed;
}
//userAuthStatus
@property (strong,nonatomic) NSString *isAuthed;

//core data accessors 
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;
//
-(BOOL) doesUserExist:(NSString *)user;
-(id) isUserAuthed:(NSString *)user
              password:(NSString *) passwordfield
            withObject:(id)object
          withSelector:(SEL)selector;
- (id)createUser:(NSString *)usernameinput
        password:(NSString *) passwordinput               
      withObject:(id)object
    withSelector:(SEL)selector;
-(id)deleteUser:(NSString *)username
     withObject:(id)object
   withSelector:(SEL)selector;
-(id)deleteDataBase:(id)sender
       withSelector:(SEL)selector;
@end
